package cn.edu.neusoft.practice.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import cn.edu.neusoft.practice.po.Apply;







//代替了DAO and.xml
//让Mapper具有对简单表直接进行映射，直接进行CRUD操作的能力，以简化我们的一些工作。

@Mapper
public interface ApplyMapper extends BaseMapper<Apply> {
	@Select("(select a.*,u.telephone as telephone,u.user_id as user_id,u.real_name as realName,u.special as special from user u join apply a on u.user_name=a.user_name)")
	List<Apply> getApplyWithTelephone();
	
	@Select("(insert into apply (user_name,picture_url) values (#{userName},#{pictureUrl});)")
	List<Apply> AddApply(Apply a);


}
